<?php require_once("common/config.inc.php");?>
<?php include("common/db.inc.php"); ?>
<?php	
global $currentJournals,$divDisplayStyle,$operateResult,$currentDate;
	init();		
	
	function init(){
		$GLOBALS[divDisplayStyle]=array();
		$operation=$_POST["operation"];
		$GLOBALS[currentJournals]=getJournals();		
	}
	
	function getJournals(){
		$sql = "SELECT * FROM medcdb.t_journal ORDER BY createdate DESC";
		$connection=getMEDCConnection();
		$dataArray=executeQuery($sql,$connection);
		return $dataArray;
	}
	
	function downloadJournal($journalId){
		
	}
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<!-- #BeginTemplate "../web-data/Templates/template-Journal.html" -->

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive">
<title>MEDC - Archive Issues of the MERDJ</title>
<style type="text/css" media="screen"><!--body { font-family: Verdana, Arial, Helvetica, sans-serif }header { color: navy; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold }p { }td { }.Smallheader { color: navy; font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold }.Maintext { font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: justify }.Header { color: navy; font-size: medium; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold }.framedcusive { font-family: "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif; font-style: italic; text-align: justify; margin: 2pt; padding: 6pt; border: double 1pt blue }.smalltext { font-size: x-small; font-family: Verdana, Arial, Helvetica, sans-serif; padding: 2pt }--></style>
<link href="css/medc.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#ffffff">
<div id="toparea">
	<?php 
	require_once "common/config.inc.php";
	require_once "common/header.inc.php"
	?>
</div>	
<div id="mainarea">
<!-- #BeginEditable "PageBody" -->
<table width="687" border="0" cellspacing="0" cellpadding="0" cool
	gridx="16" gridy="16" height="1032" showgridx showgridy usegridx
	usegridy>
	<tr height="16">
		<td width="16" height="1031" rowspan="4"></td>
		<td width="656" height="16" colspan="2"></td>
		<td width="14" height="80" rowspan="2"></td>
		<td width="1" height="16"><spacer type="block" width="1" height="16"></td>
	</tr>
	<tr height="64">
		<td content csheight="55" width="656" height="64" colspan="2"
			valign="top" xpos="16">
		<div class="Header" align="left">Archive Issues of the <i>M&ouml;ssbauer
		Effect Reference and Data Journal</i></div>
		<div class="Maintext">
		<div align="left">
		<p>Click on an issue below to download in PDF format.</p>
		</div>
		</div>
		</td>
		<td width="1" height="64"><spacer type="block" width="1" height="64"></td>
	</tr>
	<tr height="919">
		<td width="670" height="919" colspan="3" valign="top" align="left"
			xpos="16">
		<table class="Maintext" width="670" border="1" cellspacing="2"
			cellpadding="0" align="center">
			<tr style="display:none">
				<td align="center"><a href=""><img
					src="images/covers/WJ3401.jpg" alt="" height="77" width="59"
					border="0"></a><br>
				<a href="">test</a></td>
				<td align="center"></td>
				<td align="center"></td>
				<td align="center"></td>
				<td align="center"></td>
				<td align="center"></td>
				<td align="center"></td>
				<td align="center"></td>
				<td align="center"></td>
				<td align="center"></td>
			</tr>
		<?php
		$columnNames=array("id","name","facepic","storename","originalname","createdate","brief");	
		$loopCount=0;
		foreach ($GLOBALS[currentJournals] as $journal){	
			if($loopCount>0 && $loopCount%12==0){									
		?>
		<tr>
		<?php }//end for if($loopCount%12==0) ?>
		<td align="center">
			<a href="JournalDownload.php?id=<?php echo $journal["id"]; ?>&operation=download">
			<img src="<?php echo $journal["facepic"]; ?>" alt="" height="77" width="59"	border="0"></a><br>
			<a href="JournalDownload.php?id=<?php echo $journal["id"]; ?>&operation=download"><?php echo $journal["name"]; ?></a>
		</td>
		
		<?php if(($loopCount+1)%12==0){ ?>
		</tr>
		<?php
			}//end for if($loopCount%12==0)
			$loopCount++;
		}//end foreach
		if($loopCount%12!=0){
			echo "</tr>";	
		}
		?>							
		</table>
		</td>
		<td width="1" height="919"><spacer type="block" width="1" height="919"></td>
	</tr>
	<tr height="32" style="display:none">
		<td content csheight="32" width="641" height="32" valign="top"
			xpos="16">
		<div class="smalltext">
		<hr>
		M&ouml;ssbauer Effect Data Center &#150; June 2009</div>
		</td>
		<td width="29" height="32" colspan="2"></td>
		<td width="1" height="32"><spacer type="block" width="1" height="32"></td>
	</tr>
	<tr height="1" cntrlrow>
		<td width="16" height="1"><spacer type="block" width="16" height="1"></td>
		<td width="641" height="1"><spacer type="block" width="641" height="1"></td>
		<td width="15" height="1"><spacer type="block" width="15" height="1"></td>
		<td width="14" height="1"><spacer type="block" width="14" height="1"></td>
		<td width="1" height="1"></td>
	</tr>
</table>
<!-- #EndEditable -->
</div>
<div id="footer" class="center"><?php include "common/footer.inc.php"?></div>
</body>

<!-- #EndTemplate -->

</html>

